<template>
  <transition name="el-fade-in-linear">
    <div v-show="show" id="loading" class="loading-wrap">
      <div class="loading-box">
        <div class="logo">
          <img src="~@/assets/image/basicImage/logo-blue.png" alt="">
        </div>
        <div class="text-box">
          <div>L</div>
          <div>O</div>
          <div>A</div>
          <div>D</div>
          <div>I</div>
          <div>N</div>
          <div>G</div>
          <div />
          <div />
          <div />
        </div>
      </div>
    </div>
  </transition>
</template>

<script>
export default {
  name: '',
  components: {},
  props: {
    show: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {

    }
  },
  created() {},
  mounted() {},
  methods: {

  }
}
</script>

<style lang="less" scoped>
.loading-wrap{
  height: 100vh;
  width: 100vw;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255,255,255,.7);
}
.loading-box{
  height: 160px;
  width: 300px;
  // border: 1px solid #000;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  .logo{
    position: relative;
    height: 120px;
    width: 120px;
    border: 3px solid transparent;
    border-top-color: #2165f9;
    border-radius: 50%;
    padding: 15px;
    animation: spin 1s linear infinite;
    img{
      height: 100%;
      width: 100%;
      animation: spin 1s linear infinite reverse;
    }
  }
  .logo::before{
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    bottom: 2px;
    right: 2px;
    border: 3px solid transparent;
    border-top-color: #2165f9;
    border-radius: 50%;
    animation: spin .5s linear infinite reverse;
  }
  .logo::after{
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    bottom: 8px;
    right: 8px;
    border: 3px solid transparent;
    border-top-color: #2165f9;
    border-radius: 50%;
    animation: spin 1.25s linear infinite;
  }
}
.text-box{
  color: #fff;
  user-select: none;
  position: relative;
  // border: 1px solid #000;
  width: 160px;
  // height: 36px;
  font-family: initial;
  div{
    position: absolute;
    font-weight: bold;
    height: 13px;
    width: 24px;
    text-align: center;
    color: #2165f9;
    font-size: 14px;
    margin: -2px;
    transform: rotate(180deg);
    animation: move 1.8s linear infinite;
    opacity: 0;
  }
}
.text-box div:nth-of-type(8)::before,
.text-box div:nth-of-type(9)::before,
.text-box div:nth-of-type(10)::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #2165f9;
  position: absolute;
  left: 50%;
  margin-left: -2px;
  bottom: 0;
}
// .text-box div::after{
//   content: '';
//   width: 10px;
//   height: 5px;
//   border-radius: 50%;
//   background-color: rgba(0, 0, 0, .2);
//   position: absolute;
//   bottom: -10px;
//   left: 50%;
//   margin-left: -5px;
// }
// .text-box div:nth-of-type(8)::after,
// .text-box div:nth-of-type(9)::after,
// .text-box div:nth-of-type(10)::after {
//   content: '';
//   left: 50%;
//   margin-left: -5px;
// }
.text-box div:nth-of-type(1) {
  color: #2769fa;
}
.text-box div:nth-of-type(2) {
  animation-delay: .1s;
  color: #2e6ffa;
}
.text-box div:nth-of-type(3) {
  animation-delay: .2s;
  color: #3675fa;
}
.text-box div:nth-of-type(4) {
  animation-delay: .3s;
  color: #3f7cfb;
}
.text-box div:nth-of-type(5) {
  animation-delay: .4s;
  color: #4883fb;
}
.text-box div:nth-of-type(6) {
  animation-delay: .5s;
  color: #518afc;
}
.text-box div:nth-of-type(7) {
  animation-delay: .6s;
  color: #5b91fd;
}
.text-box div:nth-of-type(8) {
  animation-delay: .7s;
}
.text-box div:nth-of-type(8)::before{
  background-color: #6398fe;
}
.text-box div:nth-of-type(9) {
  animation-delay: .8s;
}
.text-box div:nth-of-type(9)::before{
  background-color: #6b9efe;
}
.text-box div:nth-of-type(10) {
  animation-delay: .9s;
}
.text-box div:nth-of-type(10)::before{
  background-color: #72a3fe;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes move {
  0% {
    right: 0;
    opacity: 0;
  }
  20% {
    right: 20%;
    opacity: 1;
    transform: rotate(0);
  }
  80% {
    right: 80%;
    opacity: 1;
    transform: rotate(0);
  }
  100% {
    right: 100%;
    transform: rotate(-180deg);
  }
}
</style>
